LIBC_VER  = $(shell ls /lib/libc-*.so | cut -c11-13)  

CPP_FILE = *.cpp 
INC_FILE = -I./ 
TAR_FILE = ./proxy

INC_TOOL   = -I/home/ran/install/libevent/include
LNK_TOOL   = -L/home/ran/install/libevent/lib -levent
LNK_TOOL  += 

INC_MYSQL  = 
LNK_MYSQL  = 

INC = $(INC_TOOL) $(INC_MYSQL) $(INC_FILE)
LNK = $(LNK_TOOL) $(LNK_MYSQL) 

CPP = $(wildcard *.cpp)
OBJ = $(CPP:%.cpp=%.o)


all:$(TAR_FILE) 

$(TAR_FILE): $(OBJ)  
	@g++ -g -o $@ $^ $(INC) $(LNK)  
	@echo $@  
  
%.o: %.cpp  
	@g++ -DNEWER_USER_ENHANCED -W -Wall -Wshadow -fPIC -g -c $*.cpp $(INC)  
	@echo $@  
  
clean:   
	rm -f *.o  
	rm $(TAR_FILE)
